package com.zxc.common;

import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
  * @author: zxc
  * @return:
  * @time:  2021/5/21 14:33
  * @description:
  */
public class MyAdvice implements MethodBeforeAdvice {
    Logger log = LoggerFactory.getLogger(MyAdvice.class);

    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        String msg = "执行的方法时"+method.getName()+",参数列表为:"+ Arrays.toString(args);
        log.debug(msg);
    }
}
